package com.zryc.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 商品分类表
 * </p>
 *
 * @author xujiajun
 * @since 2022-10-17
 */
@TableName("product_category")
@ApiModel(value = "ProductCategory对象", description = "商品分类表")
public class ProductCategory implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("分类ID")
    @TableId(value = "category_id", type = IdType.AUTO)
    private Short categoryId;

    @ApiModelProperty("分类名称")
    private String categoryName;

    @ApiModelProperty("分类编码")
    private String categoryCode;

    @ApiModelProperty("父分类ID")
    private Short parentId;

    @ApiModelProperty("分类层级")
    private Byte categoryLevel;

    @ApiModelProperty("分类状态")
    private Byte categoryStatus;

    @ApiModelProperty("删除状态")
    private Byte deleteStatus;
    @TableField(exist = false)
    private List<ProductCategory> children;

    public Byte getDeleteStatus() {
        return deleteStatus;
    }

    public void setDeleteStatus(Byte deleteStatus) {
        this.deleteStatus = deleteStatus;
    }

    public List<ProductCategory> getChildren() {
        return children;
    }

    public void setChildren(List<ProductCategory> children) {
        this.children = children;
    }

    public Short getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Short categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getCategoryCode() {
        return categoryCode;
    }

    public void setCategoryCode(String categoryCode) {
        this.categoryCode = categoryCode;
    }

    public Short getParentId() {
        return parentId;
    }

    public void setParentId(Short parentId) {
        this.parentId = parentId;
    }

    public Byte getCategoryLevel() {
        return categoryLevel;
    }

    public void setCategoryLevel(Byte categoryLevel) {
        this.categoryLevel = categoryLevel;
    }

    public Byte getCategoryStatus() {
        return categoryStatus;
    }

    public void setCategoryStatus(Byte categoryStatus) {
        this.categoryStatus = categoryStatus;
    }

    @Override
    public String toString() {
        return "ProductCategory{" +
            "categoryId = " + categoryId +
            ", categoryName = " + categoryName +
            ", categoryCode = " + categoryCode +
            ", parentId = " + parentId +
            ", categoryLevel = " + categoryLevel +
            ", categoryStatus = " + categoryStatus +
        "}";
    }


}
